# -*- coding: utf-8 -*-
"""
 @Time    : 2021/1/13 下午5:32
 @Author  : tgy
 
"""


def general_person():
    ...
    class_name = 'Person'
    class_bases = (object,)

    body = '''
name = 'zhangsan'    
def run(self):
    print('123')
'''
    locals_dic = {}
    exec(body, {}, locals_dic)
    return type(class_name, class_bases, locals_dic)


if __name__ == '__main__':
    ...
    person = general_person()()
    person.run()
    print(person.name)
